/**
 * 作者: hxl
 * 日期: 2025-05-30 17:21:59
 * 备注: 用户联盟乱斗商店数据表
 */
package com.motu.monstercity.server.game.userdata;

import com.motu.vertx.module.utility.model.EntityManager;
import com.motu.vertx.module.utility.toolset.TimeUtils;

public class UserUnionScuffleShop extends UserUnionScuffleShopModel {
    public UserUnionScuffleShop() {
        super();
    }
    public UserUnionScuffleShop(long userId, long actId, int shopId, int buyNum) {
        putUserId(userId);
        putActId(actId);
        putShopId(shopId);
        putBuyNum(buyNum);
        String groupKey = EntityManager.getFieldJoinString(userId, actId);
        putGroupListKey(groupKey);
    }

    public void reset() {
        if (!TimeUtils.isToday(dayResetTime)) {
            putDayBuyNum(0);
            putDayResetTime(TimeUtils.getCurTime());
            update();
        }
    }

}
